package list

import C "gitee.com/ljfirst/algo-go-sdk/common/constant"

/**
 * @author ljfirst
 * @version V1.0
 * @date 2023/6/28 17:03
 * @author-Email ljfirst@mail.ustc.edu.cn
 * @blogURL https://blog.csdn.net/ljfirst
 * @description 跳表
 * */
type SkipList struct {
	FromHighToLow bool // true表示从高到低排序,默认 false 表示从低到高排序
}

func NewSkipList() *SkipList {
	return &SkipList{

	}
}

func (m *SkipList) Insert(node ...*Node) {

}
func (m *SkipList) InsertIndex(index int, node ...*Node) {}

func (m *SkipList) Delete(node *Node)     {}
func (m *SkipList) DeleteIndex(index int) {}

func (m *SkipList) ValueSet() []interface{} {
	return nil
}
func (m *SkipList) Equals(node *Node) {}
func (m *SkipList) Size() int         { return 0 }
func (m *SkipList) Clear()            {}

func (m *SkipList) SortMethod(array []int) {

}

func (m *SkipList) GetAttribute() *C.Attribute {
	return &C.Attribute{
		Tags: []string{C.Sort},
		Desc: &C.Desc{
			Name:   "SkipList",
			NameCn: "跳表排序",
			ParamsDesc: map[string]string{
				"fromHighToLow": "true表示从高到低排序, 默认 false 表示从低到高排序",
			},
			Example: map[int]string{
				1: "输入[1,3,2],跳用SortMethod方法进行排序后，输出[1,2,3]",
			},
		},
	}
}
